Skip to content

Ensure pre-test is the first item in conditional mark check#20382

Merged
wangxin merged 1 commit intosonic-net:masterfrom
davidm-arista:master-pretestFirstInConditionCheck
Sep 9, 2025
Merged

Ensure pre-test is the first item in conditional mark check#20382
wangxin merged 1 commit intosonic-net:masterfrom
davidm-arista:master-pretestFirstInConditionCheck

Conversation

@davidm-arista
Copy link
Copy Markdown
Collaborator

Summary:
Ensure pre-test is first item in conditional mark check, because pre-test runs before everything else, and it makes the most sense at the top of the file.

Also this change goes with #20326
This change will allow that PR to pass its PR checks.

Type of change

  • Testbed and Framework(new/improvement)

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

What is the motivation for this PR?

To allow #20326 to pass the PR checks

How did you verify/test it?

Running it manually on PR 20326

Any platform specific information?

No

Supported testbed topology if it's a new test case?

N/A

@davidm-arista davidm-arista requested a review from wangxin as a code owner August 22, 2025 22:52
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@davidm-arista
Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 20382 in repo sonic-net/sonic-mgmt

@davidm-arista
Copy link
Copy Markdown
Collaborator Author

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

@sdszhang sdszhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@davidm-arista davidm-arista force-pushed the master-pretestFirstInConditionCheck branch from 7dc7184 to 956000e Compare August 27, 2025 16:29
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@davidm-arista davidm-arista force-pushed the master-pretestFirstInConditionCheck branch from 956000e to cd0e4de Compare August 30, 2025 01:01
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@davidm-arista davidm-arista force-pushed the master-pretestFirstInConditionCheck branch from cd0e4de to 0274d77 Compare September 7, 2025 16:40
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin wangxin merged commit dbec321 into sonic-net:master Sep 9, 2025
23 checks passed
@sdszhang
Copy link
Copy Markdown
Contributor

sdszhang commented Sep 9, 2025

There are two other PRs depends on this PR to use the new syntax. Will need it to be merged into the release branch, such as 202505 or 202412. Otherwise, will need a separate PR for release branches.
Skipping PFCWD tests for lossy topos & add anchor section by davidm-arista · Pull Request #2032…
[TH5] Skip VxLAN Tests for Non-Applicable Topologies by ccroy-arista · Pull Request #20552 · sonic-…

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Sep 9, 2025
…t#20382)

Ensure pre-test is first item in conditional mark check, because pre-test runs before everything else, and it makes the most sense at the top of the file.

Also this change goes with sonic-net#20326
This change will allow that PR to pass its PR checks.
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202505: #20581

AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
…t#20382)

Ensure pre-test is first item in conditional mark check, because pre-test runs before everything else, and it makes the most sense at the top of the file.

Also this change goes with sonic-net#20326
This change will allow that PR to pass its PR checks.

Signed-off-by: Aharon Malkin <amalkin@nvidia.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
Description of PR
Summary:
update pre-commit version to include the fix for sonic-net#20382

Approach
What is the motivation for this PR?
update pre-commit version to include the fix for sonic-net#20382

How did you do it?
update referencing version.

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Aharon Malkin <amalkin@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
…t#20382)

Ensure pre-test is first item in conditional mark check, because pre-test runs before everything else, and it makes the most sense at the top of the file.

Also this change goes with sonic-net#20326
This change will allow that PR to pass its PR checks.

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
Description of PR
Summary:
update pre-commit version to include the fix for sonic-net#20382

Approach
What is the motivation for this PR?
update pre-commit version to include the fix for sonic-net#20382

How did you do it?
update referencing version.

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
…t#20382)

Ensure pre-test is first item in conditional mark check, because pre-test runs before everything else, and it makes the most sense at the top of the file.

Also this change goes with sonic-net#20326
This change will allow that PR to pass its PR checks.
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
Description of PR
Summary:
update pre-commit version to include the fix for sonic-net#20382

Approach
What is the motivation for this PR?
update pre-commit version to include the fix for sonic-net#20382

How did you do it?
update referencing version.

signed-off-by: jianquanye@microsoft.com
wangxin added a commit to wangxin/sonic-mgmt that referenced this pull request Jan 15, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
wangxin added a commit that referenced this pull request Jan 15, 2026
PR #20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR #20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
PriyanshTratiya pushed a commit to PriyanshTratiya/sonic-mgmt that referenced this pull request Jan 21, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
AndoniSanguesa pushed a commit to AndoniSanguesa/sonic-mgmt that referenced this pull request Jan 21, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
Signed-off-by: Andoni Sanguesa <andoniesanguesa@gmail.com>
AndoniSanguesa pushed a commit to AndoniSanguesa/sonic-mgmt that referenced this pull request Jan 21, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
Signed-off-by: Andoni Sanguesa <andoniesanguesa@gmail.com>
saravanan-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Jan 22, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
Signed-off-by: Saravanan Sellappa <saravanan@nexthop.ai>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
…t#20382)

Ensure pre-test is first item in conditional mark check, because pre-test runs before everything else, and it makes the most sense at the top of the file.

Also this change goes with sonic-net#20326
This change will allow that PR to pass its PR checks.

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
Description of PR
Summary:
update pre-commit version to include the fix for sonic-net#20382

Approach
What is the motivation for this PR?
update pre-commit version to include the fix for sonic-net#20382

How did you do it?
update referencing version.

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
lakshmi-nexthop pushed a commit to lakshmi-nexthop/sonic-mgmt that referenced this pull request Jan 28, 2026
…t#20382)

Ensure pre-test is first item in conditional mark check, because pre-test runs before everything else, and it makes the most sense at the top of the file.

Also this change goes with sonic-net#20326
This change will allow that PR to pass its PR checks.

Signed-off-by: Lakshmi Yarramaneni <lakshmi@nexthop.ai>
lakshmi-nexthop pushed a commit to lakshmi-nexthop/sonic-mgmt that referenced this pull request Jan 28, 2026
Description of PR
Summary:
update pre-commit version to include the fix for sonic-net#20382

Approach
What is the motivation for this PR?
update pre-commit version to include the fix for sonic-net#20382

How did you do it?
update referencing version.

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Lakshmi Yarramaneni <lakshmi@nexthop.ai>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
…t#20382)

Ensure pre-test is first item in conditional mark check, because pre-test runs before everything else, and it makes the most sense at the top of the file.

Also this change goes with sonic-net#20326
This change will allow that PR to pass its PR checks.

Signed-off-by: Yael Tzur <ytzur@nvidia.com>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
Description of PR
Summary:
update pre-commit version to include the fix for sonic-net#20382

Approach
What is the motivation for this PR?
update pre-commit version to include the fix for sonic-net#20382

How did you do it?
update referencing version.

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Yael Tzur <ytzur@nvidia.com>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
Signed-off-by: Yael Tzur <ytzur@nvidia.com>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Feb 6, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Feb 12, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
Signed-off-by: nnelluri-cisco <nnelluri@cisco.com>
rraghav-cisco pushed a commit to rraghav-cisco/sonic-mgmt that referenced this pull request Feb 13, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
anilal-amd pushed a commit to anilal-amd/anilal-forked-sonic-mgmt that referenced this pull request Feb 19, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
Signed-off-by: Zhuohui Tan <zhuohui.tan@amd.com>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Mar 17, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
Signed-off-by: Abhishek <abhishek@nexthop.ai>
Pterosaur pushed a commit to Pterosaur/sonic-mgmt that referenced this pull request Mar 26, 2026
Note: this is a manual cherry-pick to msft-202412 of
sonic-net#20552
Note: depends on sonic-net#20382 to
pass static analysis.

### Description of PR
Skip the following tests:
decap/test_decap.py::test_decap[ttl=pipe, dscp=uniform, vxlan=set_unset]
vxlan/test_vxlan_decap.py

for the following topologes:
- t0-isolated-d32u32s2
- t0-isolated-d256u256s2
- t0-isolated-v6-d32u32s2
- t0-isolated-v6-d256u256s2
- t1-isolated-d56u2
- t1-isolated-d56u1-lag
- t1-isolated-d448u15-lag
- t1-isolated-v6-d56u2
- t1-isolated-v6-d56u1-lag
- t1-isolated-v6-d448u15-lag
- t1-isolated-d32
- t1-isolated-d128
- t1-isolated-v6-d128
- t0-isolated-d96u32s2
- t0-isolated-v6-d96u32s2

Summary:
Fixes # (issue)

### Type of change
- [ ] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
    - [ ] Skipped for non-supported platforms
- [x] Test case improvement

### Back port request
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [x] 202412

### Approach
#### What is the motivation for this PR?
Skip tests that are not required for the following topologies:
t0-isolated-d32u32s2, t0-isolated-d256u256s2, t0-isolated-v6-d32u32s2,
t0-isolated-v6-d256u256s2, t1-isolated-d56u2, t1-isolated-d56u1-lag,
t1-isolated-d448u15-lag, t1-isolated-v6-d56u2, t1-isolated-v6-d56u1-lag,
t1-isolated-v6-d448u15-lag, t1-isolated-d32, t1-isolated-d128,
t1-isolated-v6-d128, t0-isolated-d96u32s2, t0-isolated-v6-d96u32s2.

#### How did you do it?
Added a skip conditional mark to the following tests:
decap/test_decap.py::test_decap[ttl=pipe, dscp=uniform, vxlan=set_unset]
vxlan/test_vxlan_decap.py

#### How did you verify/test it?
Tried to run the test and confirmed it is skipped.
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Mar 27, 2026
…t#20382)

Ensure pre-test is first item in conditional mark check, because pre-test runs before everything else, and it makes the most sense at the top of the file.

Also this change goes with sonic-net#20326
This change will allow that PR to pass its PR checks.
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Mar 27, 2026
Description of PR
Summary:
update pre-commit version to include the fix for sonic-net#20382

Approach
What is the motivation for this PR?
update pre-commit version to include the fix for sonic-net#20382

How did you do it?
update referencing version.

signed-off-by: jianquanye@microsoft.com
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Mar 27, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Apr 1, 2026
PR sonic-net#20326 introduced anchors in the conditional mark yaml files.
The anchors are defined in a dummy entry for test_pretest.py.

PR sonic-net#20382 updated code to add exception for the sort checking of test_pretest.py in conditional mark yaml files.

These changes made it complicated when we do need to skip something for test_pretest.py.

This change fixed the problem by using a real dummy entry for defining the yaml anchors.

The code of skipping test_pretest.py in sort checking in conditional mark yaml file is also removed.

This change also improved a variable name in conditional mark and fixed a few typos.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants